package Lab15;

//航班信息：航班号，航线（起点，终点站），航班时间（星期几）航班座位数
public class PlaneInfo {
    private String planeId;
    private String routeStart;
    private String routeEnd;
    private String time;
    private int seatNum;

    public int getIsChoose() {
        return isChoose;
    }

    public void setIsChoose(int isChoose) {
        this.isChoose = isChoose;//在需要的时候获取，就在需要的调用updatePlaneTicketCounts()设置数据
    }

    //是否有人选了机票//每次启动都会刷新，遍历客户信息集合，如果客户信息中的航班号等于当前航班号，则isChoose+1
    private int isChoose = 0;


    public PlaneInfo() {
    }

    public String getPlaneId() {
        return planeId;
    }

    public void setPlaneId(String planeId) {
        this.planeId = planeId;
    }

    public String getRouteStart() {
        return routeStart;
    }

    public void setRouteStart(String routeStart) {
        this.routeStart = routeStart;
    }

    public String getRouteEnd() {
        return routeEnd;
    }

    public void setRouteEnd(String routeEnd) {
        this.routeEnd = routeEnd;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getSeatNum() {
        return seatNum;
    }

    public void setSeatNum(int seatNum) {
        this.seatNum = seatNum;
    }
    @Override
    public String toString() {
        return getPlaneId() + "\t" + getRouteStart() +"->"+getRouteEnd()  + "\t" + getTime() + "\t" + getSeatNum();
    }
}
